package com.ihr360.commons.utils;

import com.ihr360.commons.exception.Ihr360SimpleResultException;

/**
 * @author tomtao
 */
public class RestToReturnUtils {

    public static void setMessage(String message){
        throw Ihr360SimpleResultException.builder().message(message).build();
    }

    public static void setMessage(String messageKey, String message){
        throw Ihr360SimpleResultException.builder().messageKey(messageKey).message(message).build();
    }

    public static void setMessage(String messageKey, String message, Object[] args){
        throw Ihr360SimpleResultException.builder().messageKey(messageKey).message(message).args(args).build();
    }

}
